#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define mes(x) memset(x,0,sizeof(x))
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout)

int read(){
	int x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);
	return x*sgn;
}

const int MAXN = 3010;
const int mod = 1e9+7;

int n,m;
ll f[2][MAXN],g[2][MAXN];

int main (){
	n = in,m = in;
	for(int i = 1;i <= n;i++) f[0][i] = 1; g[0][0] = 1;
	for(int o = 1,i = 1;i <= m;i++,o^=1){
		for(int j = 0;j <= n;j++){
			f[o][j] = 0;g[o][j] = 0;
			if(j){
				f[o][j] = (f[o][j] + f[o^1][j-1]) % mod;
				g[o][j] = (g[o][j] + g[o^1][j-1] + g[o^1][j]) % mod;
				if(j > 1) f[o][j] = (f[o][j] + f[o^1][j]) % mod;
				else g[o][j] = (g[o][j] + f[o^1][j]) % mod;
			}
			if(j < n){
				g[o][j] = (g[o][j] + g[o^1][j+1] + g[o^1][j]) % mod;
				if(j) f[o][j] = (f[o][j] + f[o^1][j] + f[o^1][j+1]) % mod;
				else g[o][j] = (g[o][j] + f[o^1][j+1]) % mod;
			}
		}
	}ll ans = 0;for(int i = 0;i <= n;i++) ans = (ans + g[m&1][i]) % mod;
	printf("%lld\n",ans);
	return 0;
}

